package com.ruoyi.project.hissystem.domain;

import com.ruoyi.framework.web.domain.BaseEntity;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * @author : 杨磊
 * @date : 15:02 2021/8/19
 */
public class HisMenu extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** 菜单ID */
    private Long menuId;

    /** 菜单名称 */
    private String menuName;

    /** 父菜单名称 */
    private String parentName;

    /** 父菜单ID */
    private Long parentId;

    /** 显示顺序 */
    private String orderNum;

    /** 路由地址 */
    private String path;

    /** 组件路径 */
    private String component;

    /** 是否为外链（0是 1否） */
    private String isFrame;

    /** 是否缓存（0缓存 1不缓存） */
    private String isCache;

    /** 类型（M目录 C菜单 F按钮） */
    private String menuType;

    /** 显示状态（0显示 1隐藏） */
    private String visible;

    /** 菜单状态（0显示 1隐藏） */
    private String status;

    /** 权限字符串 */
    private String perms;

    /** 菜单图标 */
    private String icon;

    /** 子菜单 */
    private List<HisMenu> children = new ArrayList<HisMenu>();

    @Override
    public String toString() {
        return "HisMenu{" +
              "menuId=" + menuId +
              ", menuName='" + menuName + '\'' +
              ", parentName='" + parentName + '\'' +
              ", parentId=" + parentId +
              ", orderNum='" + orderNum + '\'' +
              ", path='" + path + '\'' +
              ", component='" + component + '\'' +
              ", isFrame='" + isFrame + '\'' +
              ", isCache='" + isCache + '\'' +
              ", menuType='" + menuType + '\'' +
              ", visible='" + visible + '\'' +
              ", status='" + status + '\'' +
              ", perms='" + perms + '\'' +
              ", icon='" + icon + '\'' +
              ", children=" + children +
              '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        HisMenu hisMenu = (HisMenu) o;
        return Objects.equals(menuId, hisMenu.menuId) && Objects.equals(menuName, hisMenu.menuName) && Objects.equals(parentName, hisMenu.parentName) && Objects.equals(parentId, hisMenu.parentId) && Objects.equals(orderNum, hisMenu.orderNum) && Objects.equals(path, hisMenu.path) && Objects.equals(component, hisMenu.component) && Objects.equals(isFrame, hisMenu.isFrame) && Objects.equals(isCache, hisMenu.isCache) && Objects.equals(menuType, hisMenu.menuType) && Objects.equals(visible, hisMenu.visible) && Objects.equals(status, hisMenu.status) && Objects.equals(perms, hisMenu.perms) && Objects.equals(icon, hisMenu.icon) && Objects.equals(children, hisMenu.children);
    }

    @Override
    public int hashCode() {
        return Objects.hash(menuId, menuName, parentName, parentId, orderNum, path, component, isFrame, isCache, menuType, visible, status, perms, icon, children);
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Long getMenuId() {
        return menuId;
    }

    public void setMenuId(Long menuId) {
        this.menuId = menuId;
    }

    public String getMenuName() {
        return menuName;
    }

    public void setMenuName(String menuName) {
        this.menuName = menuName;
    }

    public String getParentName() {
        return parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(String orderNum) {
        this.orderNum = orderNum;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getComponent() {
        return component;
    }

    public void setComponent(String component) {
        this.component = component;
    }

    public String getIsFrame() {
        return isFrame;
    }

    public void setIsFrame(String isFrame) {
        this.isFrame = isFrame;
    }

    public String getIsCache() {
        return isCache;
    }

    public void setIsCache(String isCache) {
        this.isCache = isCache;
    }

    public String getMenuType() {
        return menuType;
    }

    public void setMenuType(String menuType) {
        this.menuType = menuType;
    }

    public String getVisible() {
        return visible;
    }

    public void setVisible(String visible) {
        this.visible = visible;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getPerms() {
        return perms;
    }

    public void setPerms(String perms) {
        this.perms = perms;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public List<HisMenu> getChildren() {
        return children;
    }

    public void setChildren(List<HisMenu> children) {
        this.children = children;
    }

    public HisMenu(Long menuId, String menuName, String parentName, Long parentId, String orderNum, String path, String component, String isFrame, String isCache, String menuType, String visible, String status, String perms, String icon, List<HisMenu> children) {
        this.menuId = menuId;
        this.menuName = menuName;
        this.parentName = parentName;
        this.parentId = parentId;
        this.orderNum = orderNum;
        this.path = path;
        this.component = component;
        this.isFrame = isFrame;
        this.isCache = isCache;
        this.menuType = menuType;
        this.visible = visible;
        this.status = status;
        this.perms = perms;
        this.icon = icon;
        this.children = children;
    }

    public HisMenu() {
    }
}
